package com.example.yibu.utils;

import java.util.Map;

public class MapToStringUtils {

    /**
     * map类型转为String类型
     * @param map  map数据
     * @return String
     */
    public static String mergeMapEntries(Map<String, String> map) {
        StringBuilder sb = new StringBuilder();
        for (Map.Entry<String, String> entry : map.entrySet()) {
            sb.append(entry.getKey()).append(": ").append(entry.getValue());
        }
        return sb.toString();
    }
}
